## ---------------------------------------------------------------------
##
## Copyright (C) 2020 by the hyper.deal authors
##
## This file is part of the hyper.deal library.
##
## The hyper.deal library is free software; you can use it, redistribute
## it, and/or modify it under the terms of the GNU Lesser General
## Public License as published by the Free Software Foundation; either
## version 3.0 of the License, or (at your option) any later version.
## The full text of the license can be found in the file LICENSE.MD at
## the top level directory of hyper.deal.
##
## ---------------------------------------------------------------------

# adopted from https://github.com/kronbichler/adaflo/blob/master/tests/run_test.cmake

EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND}
    --build ${BINARY_DIR} --target ${TESTNAME}.diff
    RESULT_VARIABLE _result_code
    OUTPUT_VARIABLE _output
    )
IF("${_result_code}" STREQUAL "0")
    MESSAGE("${TESTNAME}: success.")
ELSE()
    MESSAGE("*** ${ERROR}: ***")
    MESSAGE(${_output})
    MESSAGE(FATAL_ERROR "*** Test aborted.")
ENDIF()
